package kvoog.arkanoid.screens;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.scenes.scene2d.InputEvent;
import com.badlogic.gdx.scenes.scene2d.ui.Table;
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;

import kvoog.arkanoid.core.KvoogGame;

public class MenuScreen extends KvoogScreen {

	public MenuScreen(KvoogGame game) {
		super(game);
	}

	@Override
	public void resize(int width, int height) {
		super.resize(width, height);
	}

	@Override
	public void show() {
		super.show();
		
		Gdx.input.setInputProcessor(stage);
		
		Table table = super.getTable();
		
		table.add("Welcome to Arkanoid!").spaceBottom(50);
		table.row();

		TextButton startGameButton = new TextButton( "Start game", getSkin() );
        startGameButton.addListener( new ClickListener() {
            @Override
			public void clicked(InputEvent event, float x, float y) {
				super.clicked(event, x, y);
				game.setScreen( game.getGameScreen() );
			}
        } );
        table.add(startGameButton).size(300,  60).uniform().spaceBottom(10);
        table.row();
        
        TextButton optionsButton = new TextButton( "Options", getSkin() );
        optionsButton.addListener( new ClickListener() {
        	@Override
			public void clicked(InputEvent event, float x, float y) {
				super.clicked(event, x, y);
				//game.setScreen( game.getOptionsScreen() );
			}
        } );
        table.add( optionsButton ).uniform().fill().spaceBottom(10);
        table.row();
	}

	@Override
	public void render(float delta) {
		super.render(delta);
	}
	
	
}
